Page({
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id='+this.data.houseDetail.id,
    })
  },
  //获取房屋id
  onLoad({id}){
    this.getHouseDetail(id)
  },
  //获取房屋详情数据
 async getHouseDetail(id){
   const res = await wx.http.get('/room/'+id)
   if (res.code !== 10000) {
    return wx.utils.toast('获取数据失败','fail')
   }
   console.log(res);
   this.setData({
     houseDetail:res.data
   })
 }
})
